/*
* @Author: wanghongfucoder
* @Date:   2017-04-06 09:54:08
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-04-06 09:59:14
*/

public  class Demo {
	
	public static void main(String[] args) {

		StudentDao studentDao = new StudentImpl();
		for (Student student : studentDao.getAllStudent()) {
			System.out.println("Student : [RollNo : ]"+student.getRollNo()+",Name : "+student.getName()+"]");
		}

		Student student=studentDao.getAllStudent().get(0);
		student.setName("wanghongfucoder");
		studentDao.updateStudent(student);


		studentDao.getStudent(0);
		System.out.println("Student : [RollNo : ]"+student.getRollNo()+",Name : "+student.getName()+" ]");
	}
}